package com.yh.service.impl;

import com.yh.mapper.EmpMapper;
import com.yh.model.Emp;
import com.yh.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ClassName:EmpServiceImpl
 * Package:com.yh.service.impl
 * Time: 2024/6/6
 */

@Service("empService")
public class EmpServiceImpl implements EmpService {

    @Autowired
    private EmpMapper empMapper;

    @Override
    public List<Emp> findByEmp(Emp emp) {
        return empMapper.selectByEmp(emp);
    }

    @Override
    public int addEmp(Emp emp) {
        return empMapper.addEmp(emp);
    }

    @Override
    public int deleteEmp(List<Long> id) {
        return empMapper.deleteEmps(id);
    }

    @Override
    public int updateEmp(Emp emp) {
        return empMapper.updateEmp(emp);
    }
}
